package me.zhengjie.server;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.dao.*;
import me.zhengjie.dao.dto.ContainerQueryCriteria;
import me.zhengjie.utils.PageResult;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface ContainerService extends IService<ContainerDao> {


    /**
     * 查询数据分页
     *
     * @param criteria 条件
     * @param page     分页参数
     * @return PageResult
     */
    PageResult<ContainerDao> queryAll(ContainerQueryCriteria criteria, Page<Object> page);

    /**
     * 查询所有数据不分页
     *
     * @param criteria 条件参数
     * @return List<ContainerDto>
     */
    List<ContainerDao> queryAll(ContainerQueryCriteria criteria);

    /**
     * 创建
     *
     * @param resources /
     */
    void create(ContainerDao resources);

    /**
     * 编辑
     *
     * @param resources /
     */
    void update(ContainerDao resources);

    /**
     * 多选删除
     *
     * @param ids /
     */
    void deleteAll(List<String> ids);

    /**
     * 导出数据
     *
     * @param all      待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<ContainerDao> all, HttpServletResponse response) throws IOException;

    List<ContainerDao> findDataList(ContainerDao containerDao);

    ContainerDao findDataOne(String containerCode);

    boolean updateDataById(ContainerDao containerDao);


    HandOutBandReturnDao handOutBandDetail(HandOutBandDao resources);

    Object handOutBand(HandToOutBandDao param) throws IOException;

    Object handScan(HandSacnDao param);

    Object handOut(HandSacnDao param);

    PageResult<ContainerDao> findNewContainer(ContainerParamDao containerDao);
}
